package iterator_pattern.exercise.exercise1;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * 市场部
 * @author ricejson
 */
public class MarketDepartment extends Department {
    private static final Map<Integer, String> employees = new HashMap<>();
    static {
        employees.put(0, "王五");
        employees.put(1, "赵六");
    }

    public MarketDepartment(String name) {
        super(name);
    }

    public int size() {
        return employees.size();
    }

    public String get(int idx) {
        return employees.get(idx);
    }

    @Override
    public Iterator createIterator() {
        return new MarketDepartmentIterator(this);
    }
}
